TX 07 - Forcing TextEdit To Draw Over a Background Image (15-Feb-96)

QHow do I get TextEdit to draw over a background image? Whenever TextEdit redraws the text, it erases the background image.

ATo get TextEdit not to erase the background when it redraws, you need to replace two QuickDraw bottleneck routines -- StdRect and StdRgn -- with your own custom versions. Your routines will check to see if the operation to be performed is erase, and if so, your routine draws the image you want to show through the TextEdit area, instead of erasing the area to the current background color. A code snippet called "TE Over Background" shows you how to accomplish this. You can find it on the Developer Tool Chest CD: Dev.CD Feb 96 TC:Sample Code:Snippets:QuickDraw:TE Over Background, or at http://dev.info.apple.com/source/code/Snippets/QuickDraw/TE_Over_Background/TESample.c.html.



Return to Text
Return to Technical Q & A's
Return to Developer Services and Products